package org.openfans.domain;

import java.util.Date;

/**
 * 描述：feed里的每一项，将通过推荐形成文章<br>
 * 日期：2006-5-30<br>
 * 
 * @author 张俊<br>
 * @email:pesome@gmail.com<br>
 */
public class FeedItem {
	/**
	 * 显示一个月内的日志
	 */
	public static final int ONE_MONTH_CONDITION = 2;

	/**
	 * 显示一个星期内的日志
	 */
	public static final int TREE_MONTH_CONDITION = 1;

	/**
	 * 显示所有日志
	 */
	public static final int NO_CONDITION = 0;

	/**
	 * 显示当天发表的日志
	 */
	public static final int ONE_DAY_CONDITON = 4;

	/**
	 * 显示一个星期内的日志
	 */
	public static final int ONE_WEEK_CONDITION = 3;

	// public static String getOrder(int type) {
	// switch (type) {
	// case ONE_WEEK_CONDITION:
	// return "and TO_DAYS(NOW()) - TO_DAYS(publish_date) <= 7";
	// case TREE_MONTH_CONDITION:
	// return "and TO_DAYS(NOW()) - TO_DAYS(publish_date) <= 90";
	// case ONE_MONTH_CONDITION:
	// return "and TO_DAYS(NOW()) - TO_DAYS(publish_date) <= 30";
	// case ONE_DAY_CONDITON:
	// return "and TO_DAYS(NOW()) = TO_DAYS(publish_date)";
	// case NO_CONDITION:
	// return "";
	// default:
	// return "";
	// }
	// }

	private String content;

	private String source;

	private String author;

	private Fans fans;

	private int id;

	private Date publishDate;

	private Fans recomFans;

	private Date submitDate;

	private String title;

	private String url;

	private Feed feed;

	/**
	 * 这个feed所生成的文章,便于收藏用
	 */
	private Article article;

	public Feed getFeed() {
		return feed;
	}

	public void setFeed(Feed feed) {
		this.feed = feed;
	}

	public String getContent() {
		return content;
	}

	public Fans getFans() {
		return fans;
	}

	public int getId() {
		return id;
	}

	public Date getPublishDate() {
		return publishDate;
	}

	public Fans getRecomFans() {
		return recomFans;
	}

	public Date getSubmitDate() {
		return submitDate;
	}

	public String getTitle() {
		return title;
	}

	public String getUrl() {
		return url;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public void setFans(Fans fans) {
		this.fans = fans;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

	public void setRecomFans(Fans recomFans) {
		this.recomFans = recomFans;
	}

	public void setSubmitDate(Date submitDate) {
		this.submitDate = submitDate;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Article getArticle() {
		return article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

}
